package com.zishi.service.impl;

import com.zishi.model.pojo.Article;
import com.zishi.mapper.ArticleMapper;
import com.zishi.service.ArticleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author TP
 * @since 2022-05-05 08:53:41
 */
@Service
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService {

    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public boolean updateLikeNum(Integer articleId, Integer liked) {
        return articleMapper.updateLikeNum(articleId, liked);
    }

    @Override
    public boolean updateCollectNum(Integer articleId, Integer collected) {
        return articleMapper.updateCollectNum(articleId, collected);
    }
}
